We often run a dxl script which process(pulls from library module) many OLE objects, pictures and attribute values(string).
At the end of the successful excecution, the memory is not released by the dxl. 1.2GB memory space is taken.
In order to run the dxl for another time, Only option we have to close DOORS, relogin and run again. This is not acceptable by the users.
Is there any better approach to release memory space and avoid memory leak.
Any suggestion is appreciated.
Thanks,
FZ
faisal.zahidi@boeing.com - Mon Jan 31 14:11:30 EST 2011 |
Re: Memory Leak Mathias Mamsch - Mon Jan 31 16:18:14 EST 2011
I know the effect - unfortunately I am not sure how this happens. My newer experiments indicate, that normally DXL will release ALL memory (even the strings) that were allocated in the context of the DXL program, after the DXL program ends, even if the DXL program does not explicitly release its memory. Under some conditions (as in your example) memory seems to leak even after the DXL ends (which is probably to be considered a bug, and is probably due to some perms forgetting to associate the allocated memory to the DXL context). Would be nice to find the reason (which one) for that! Anyway:
Usually you can find the memory leak by starting to comment out code, until the memory leak goes away. Then you slowly start commenting in code, until it appears again, etc. until you know which line(s) of code cause the leak. Usually you can recode the leaking part, so that memory will not leak anymore or not as bad (e.g. avoid repeated calls to the same functions using a cache, or replace the leaking functions by other code).
Hope that helps, regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|